
#ifndef __COLLECTOR_PROTOCOL_H__
#define __COLLECTOR_PROTOCOL_H__
#include <stdint.h>
#include <stdio.h>
#include "comfunc.h"

#pragma pack(1)
struct clct_frame//collector frame
{
    uint8_t stc;
    uint16_t cmd;
    uint16_t len;   
    uint8_t data[1];
};
struct interval_of_clct
{
    uint8_t 	unit;
    uint8_t 	time[4];
};
#pragma pack()


struct clct_frame *get_collector_frame(uint8_t rxframe_raw[],uint16_t rxlen);
void frame_parse(QString hex_str, QString &parse_str );
void handle_clct_frame(struct clct_frame *pframe);
int8_t org_clct_frame(uint8_t frame[], int16_t frame_max_len, uint16_t cmd, uint8_t data[], int16_t data_len);

#endif
	
	

  
